home *** CD-ROM | disk | FTP | other *** search
-
-
-
- sssseeeettttuuuuiiiidddd((((2222)))) sssseeeettttuuuuiiiidddd((((2222))))
-
-
-
- NNNNAAAAMMMMEEEE
- _ssss_eeee_tttt_uuuu_iiii_dddd, _ssss_eeee_tttt_gggg_iiii_dddd - set user and group IDs
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_uuuu_nnnn_iiii_ssss_tttt_dddd_...._hhhh_>>>>
-
- _iiii_nnnn_tttt _ssss_eeee_tttt_uuuu_iiii_dddd_((((_uuuu_iiii_dddd______tttt _uuuu_iiii_dddd_))))_;;;;
-
- _iiii_nnnn_tttt _ssss_eeee_tttt_gggg_iiii_dddd_((((_gggg_iiii_dddd______tttt _gggg_iiii_dddd_))))_;;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The _ssss_eeee_tttt_uuuu_iiii_dddd system call sets the real user ID, effective user ID, and
- saved user ID of the calling process. The _ssss_eeee_tttt_gggg_iiii_dddd system call sets the
- real group ID, effective group ID, and saved group ID of the calling
- process.
-
- At login time, the real user ID, effective user ID, and saved user ID of
- the login process are set to the login ID of the user responsible for the
- creation of the process. The same is true for the real, effective, and
- saved group IDs; they are set to the group ID of the user responsible for
- the creation of the process.
-
- When a process calls _eeee_xxxx_eeee_cccc(2) to execute a file (program), the user and/or
- group identifiers associated with the process can change:
-
- The real user and group IDs are always set to the real user and
- group IDs of the process calling _eeee_xxxx_eeee_cccc.
-
- The saved user and group IDs of the new process are always set to
- the effective user and group IDs of the process calling _eeee_xxxx_eeee_cccc.
-
- If the file executed is not a set-user-ID or set-group-ID file, the
- effective user and group IDs of the new process are set to the
- effective user and group IDs of the process calling _eeee_xxxx_eeee_cccc.
-
- If the file executed is a set-user-ID file, the effective user ID of
- the new process is set to the owner ID of the executed file.
-
- If the file executed is a set-group-ID file, the effective group ID
- of the new process is set to the group ID of the executed file.
-
- The following subsections describe the behavior of _ssss_eeee_tttt_uuuu_iiii_dddd and _ssss_eeee_tttt_gggg_iiii_dddd with
- respect to the three types of user and group IDs.
-
- _ssss_eeee_tttt_uuuu_iiii_dddd
- If the calling process has the _ssss_uuuu_pppp_eeee_rrrr_----_uuuu_ssss_eeee_rrrr privilege, the real, effective,
- and saved user IDs are set to the _u_i_d parameter.
-
- If the calling process does not have the _ssss_uuuu_pppp_eeee_rrrr_----_uuuu_ssss_eeee_rrrr privilege, but _u_i_d is
- either the real user ID or the saved user ID of the calling process, the
- effective user ID is set to _u_i_d.
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- sssseeeettttuuuuiiiidddd((((2222)))) sssseeeettttuuuuiiiidddd((((2222))))
-
-
-
- _ssss_eeee_tttt_gggg_iiii_dddd
- If the calling process has the _ssss_uuuu_pppp_eeee_rrrr_----_uuuu_ssss_eeee_rrrr privilege, the real, effective,
- and saved group IDs are set to the _g_i_d parameter.
-
- If the calling process does not have the _ssss_uuuu_pppp_eeee_rrrr_----_uuuu_ssss_eeee_rrrr privilege, but _g_i_d is
- either the real group ID or the saved group ID of the calling process,
- the effective group ID is set to _g_i_d.
-
- _ssss_eeee_tttt_uuuu_iiii_dddd and _ssss_eeee_tttt_gggg_iiii_dddd fail if one or more of the following is true:
-
- _EEEE_PPPP_EEEE_RRRR_MMMM For _ssss_eeee_tttt_uuuu_iiii_dddd, the calling process does not have the _ssss_uuuu_pppp_eeee_rrrr_----_uuuu_ssss_eeee_rrrr
- privilege and the _u_i_d parameter does not match either the real
- or saved user IDs. For _ssss_eeee_tttt_gggg_iiii_dddd, the calling process does not
- have the _ssss_uuuu_pppp_eeee_rrrr_----_uuuu_ssss_eeee_rrrr privilege and the _g_i_d parameter does not
- match either the real or saved group IDs.
-
- _EEEE_IIII_NNNN_VVVV_AAAA_LLLL The _u_i_d or _g_i_d is out of range.
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Upon successful completion, a value of 0 is returned. Otherwise, a value
- of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to indicate the error.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- _iiii_nnnn_tttt_rrrr_oooo(2), _eeee_xxxx_eeee_cccc(2), _gggg_eeee_tttt_gggg_rrrr_oooo_uuuu_pppp_ssss(2), _gggg_eeee_tttt_uuuu_iiii_dddd(2), _ssss_tttt_aaaa_tttt(5).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-